﻿<script language="javascript" type="text/javascript">
    function showTagDialogBox() {
        $('#tagDialogBox').dialog({
            autoOpen: true,
            title: "Đăng nhập hệ thống",
            modal: true,
            height: 300,
            width: 450,
            buttons: {
                "Close": function () {
                    $(this).dialog("close");
                }
            }
        }).parent().appendTo($("form:first"));

        return false;
    }
</script>
@if (Request.IsAuthenticated)
{
    <text>@Resources.MultiResources.lbWelcome <strong>@User.Identity.Name</strong>!&nbsp;[
    @Html.ActionLink("Change pass", "ChangePassword", "Account")
    ]&nbsp; [ @Html.ActionLink("Log Off", "LogOff", "Account") ]</text>
}
else
{ 
    <strong style="font-style: italic;"><a href="#" onclick="showTagDialogBox();">Đăng nhập</a></strong>
}
<script type="text/javascript">
    function CreateCookie(name, day) {
        var expires = "";
        var cookiename = "";
        if (day) {
            var date = new Date();
            date.setTime(date.getTime() + (day * 24 * 60 * 60 * 1000));
            expires = "; expires =" + date.toGMTString();
        }
        else {
            expires = "";
        }
        cookiename = "TamAnLang" + "=" + name + expires + ";path = /";
        document.cookie = cookiename;
        window.location.reload();
    }

</script>
&nbsp;&nbsp; <a href="javascript:CreateCookie('en',365);">
    <img src="@Url.Content("../../Content/images/en.ico")" alt="English" title="" />
</a>&nbsp;&nbsp;<a href="javascript:CreateCookie('vn',365);">
    <img src="@Url.Content("../../Content/images/vi.ico")" alt="English" title="" />
</a>
@if (!Request.IsAuthenticated)
{
    @Html.Partial("_LogOnForm")
}
